<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">

<ui:composition template="../templates/template.xhtml">

	<ui:define name="title">
	 	Legal Preparation Establishment Filing Page
	</ui:define>
	<ui:param name="page" value="home" />
	<ui:define name="header">
		<ui:include src="../header.xhtml" />
	</ui:define>

	<ui:define name="menu">
		<h:form>
			<div align="center"><br />
			<br />
			<h:commandButton value="Back"
				action="#{filingDocumentUploadPage.back}"
				styleClass="buttonClass" /> <br />
			<br />

			</div>
		</h:form>
	</ui:define>

	<ui:define name="body">

		<f:loadBundle basename="us.gaaoc.framework.webapp.util.userMessage" var="bundle" />

		<h:form id="uploadForm" enctype="multipart/form-data" method="POST">

			<!-- for look up -->
			<br />
			<div id="bodypanel" class="grouping"><h:outputLabel
				value="Prepare Filings for Attorney" styleClass="textFont200" /> <br />
			<br />
			 <br />

			<br />
			<h:panelGrid width="100%" columns="3" styleClass="iCubed">
				<f:facet name="header">
								Document Type
							</f:facet>
				<h:column> 
								Select Document Type: 
							</h:column>
			   <h:column>
					<h:selectOneMenu id="caseType" size="1" value="#{filingDocumentUploadPage.docType}" binding="#{filingDocumentUploadPage.docTypeInput}" title="#{bundle.documentDescription}">
						<f:selectItems id="selectItem" value="#{filingDocumentUploadPage.docTypeDescriptionsItems}"  />
					</h:selectOneMenu>
				</h:column>
				<h:column />
				<h:column>			
								Prepare Document for Filing
							</h:column>
					<h:column>
						<t:inputFileUpload id="upload"
							value="#{filingDocumentUploadPage.myFile}" storage="file"
							required="true" />
					</h:column>
	
				<h:column />
								<h:column>
					<h:outputText value="Upload as Exhibit:"/>
				</h:column>
				<h:column>
					<h:selectBooleanCheckbox id="asExhibitCheckbox" value="#{filingDocumentUploadPage.asExhibit}"  title="#{bundle.exhibitButton}" >					
					</h:selectBooleanCheckbox>
				</h:column>				
				
			</h:panelGrid> <br />

			<h:commandButton id="uploadFile" value="UPLOAD FILE"
				action="#{filingDocumentUploadPage.uploadFile}"
				styleClass="buttonClass" title="#{bundle.uploadFileButton}" />
			 <h:message for="uploadFile" styleClass="error" />
			</div>
			<br />
		</h:form>

 
	


	     <h:form
			rendered="#{filingDocumentUploadPage.renderListOfPersonsBtn}">
			<h:outputText
				value="List of persons extracted from the text data file"
				styleClass="header" />
			<div class="grouping"><h:outputText value="Custodial" /> <h:panelGrid
				columns="5" width="100%">
				<h:dataTable id="DATATABLE_custodial" width="100%"
					value="#{filingDocumentUploadPage.cusPerson}"
					var="custodial"
					columnClasses="dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="Last Name" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{custodial.lastName}"
							styleClass="textFont75" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="First Name" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{custodial.firstName}"
							styleClass="textFont75" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Middle" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{custodial.middleName}"
							styleClass="textFont75" />
					</h:column>
				</h:dataTable>
			</h:panelGrid></div>
			<div class="grouping"><h:outputText value="Non Custodial" /> <h:panelGrid
				columns="5" width="100%">

				<h:dataTable id="DATATABLE_noncustodial" width="100%"
					value="#{filingDocumentUploadPage.nonCusPerson}"
					var="noncustodial"
					columnClasses="dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass">

					<h:column>
						<f:facet name="header">
							<h:outputText value="Last Name" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{noncustodial.lastName}"
							styleClass="textFont75" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="First Name" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{noncustodial.firstName}"
							styleClass="textFont75" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Middle" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{noncustodial.middleName}"
							styleClass="textFont75" />
					</h:column>
				</h:dataTable>
			</h:panelGrid></div>
			<div class="grouping"><h:outputText
				value="Initiating Party Persons " /> <h:panelGrid columns="5"
				width="100%">

				<h:dataTable id="DATATABLE_initiating" width="100%"
					value="#{filingDocumentUploadPage.initiatingPartyPersonsList}"
					var="initiating"
					columnClasses="dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass">

					<h:column>
						<f:facet name="header">
							<h:outputText value="Last Name" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{initiating.lastName}"
							styleClass="textFont75" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="First Name" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{initiating.firstName}"
							styleClass="textFont75" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Middle" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:outputText value="#{initiating.middleName}"
							styleClass="textFont75" />
					</h:column>
				</h:dataTable>
			</h:panelGrid></div>
		</h:form>



		<h:form>
			<h:column>
				<h:commandButton value="Review of Filing"
					action="#{filingDocumentUploadPage.gotoCaseDetailsPage}"
					styleClass="buttonClass"
					rendered="#{filingDocumentUploadPage.renderReviewBtn}" title="#{bundle.reviewFiling}"/>
			</h:column>
		</h:form>


		<h:form>
			<h:outputText value="List of Uploaded Documents" styleClass="header" />
			<div class="grouping"><h:panelGrid columns="5" width="100%">
				<h:dataTable id="DATATABLE_documents" width="100%"
					value="#{filingDocumentUploadPage.uploadedDocumentList}"
					var="documents"
					columnClasses="dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass,dataTableColumnClass">
					<h:column rendered="#{(not documents.sentToAttorney)}">
						<f:facet name="header">
							<h:outputText value="Title" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:commandLink value="#{documents.title}"
							action="#{filingDocumentUploadPage.viewFile}"
							styleClass="textFont75">
							<f:param name="document" value="#{documents}"
								binding="#{filingDocumentUploadPage.documentClicked}" />
						</h:commandLink>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="" styleClass="subHeadingTextClass" />
						</f:facet>
						<h:commandLink value="Delete"
							action="#{filingDocumentUploadPage.deleteDocument}"
							styleClass="textFont75">
							<f:param name="document" value="#{documents}"
								binding="#{filingDocumentUploadPage.documentClicked}" />
						</h:commandLink>
					</h:column>




				</h:dataTable>
			</h:panelGrid></div>



		</h:form>


	</ui:define>
</ui:composition>

</html>


